Skip to content

Rootless mode also bind service nodePort to host for LoadBalancer type#9512

Merged
brandond merged 1 commit intok3s-io:masterfrom
hinshun:feature/rootless-bind-node-port
Mar 1, 2024
Merged

Rootless mode also bind service nodePort to host for LoadBalancer type#9512
brandond merged 1 commit intok3s-io:masterfrom
hinshun:feature/rootless-bind-node-port

Conversation

@hinshun
Copy link
Copy Markdown
Contributor

@hinshun hinshun commented Feb 16, 2024

Proposed Changes

When creating a service, typically the service port is for pod-to-pod access whereas nodePort is used for external access. In non-rootless mode, I was able to access a service of type LoadBalancer via localhost on both its service port and nodePort.

However, in rootless mode, I was only able to access it via localhost on its service port but not its nodePort.

Types of Changes

Rootless mode should also bind service nodePort to host for LoadBalancer type, matching UX of rootful mode.

Verification

  1. kubectl apply a simple pod & LoadBalancer service with nodePort
  2. Pod is accessible via service port and nodePort

Linked Issues

User-Facing Change

Rootless mode should also bind service nodePort to host for LoadBalancer type, matching UX of rootful mode.

Signed-off-by: Edgar Lee <edgarhinshunlee@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 42.91%. Comparing base (085ccbb) to head (1c40872).
Report is 13 commits behind head on master.

Files Patch % Lines
pkg/rootlessports/controller.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9512      +/-   ##
==========================================
- Coverage   49.12%   42.91%   -6.21%     
==========================================
  Files         151      154       +3     
  Lines       13475    13529      +54     
==========================================
- Hits         6619     5806     -813     
- Misses       5515     6554    +1039     
+ Partials     1341     1169     -172     
Flag Coverage Δ
e2etests ?
inttests 39.48% <0.00%> (-0.01%) ⬇️
unittests 15.95% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants